function add() {
    alert("111");
    $.ajax({
        url:"localhost:8080/Register/adduser",
        type:"POST",
        contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
        data: {
            "username":$("#username").val,
            "password": $("#password").val,
            "phone": $("#phone").val,
            "address": $("#address").val(),
            "birthdate": $("#birthday").val(),
        },
        success:function(){
            alert("添加成功");
            window.location="localhost:8080/login";
        },
        error:function () {
            alert("添加失败");
            window.location="localhost:8080/Register/user";
        }
    })

}